Skip to content

feat(mcp): add list_plugins and get_node_definition tools#381

Merged
streamer45 merged 2 commits into
mainfrom
devin/1777138115-mcp-list-plugins-get-node-definition
Apr 25, 2026
Merged

feat(mcp): add list_plugins and get_node_definition tools#381
streamer45 merged 2 commits into
mainfrom
devin/1777138115-mcp-list-plugins-get-node-definition

Conversation

@staging-devin-ai-integration
Copy link
Copy Markdown
Contributor

@staging-devin-ai-integration staging-devin-ai-integration Bot commented Apr 25, 2026

Summary

Add two new MCP tools to the StreamKitMcp service for plugin discovery and targeted node lookup:

  • list_plugins — Lists installed plugins filtered by caller permissions, delegating to plugin_manager.list_plugins() with is_plugin_allowed() filtering. Takes no arguments beyond auth context.

  • get_node_definition — Looks up a single node definition by kind. Checks both is_node_allowed() and is_plugin_allowed() (for plugin:: prefixed kinds) before using the existing filtered_node_definitions() helper to find the matching definition. Returns a not found error for unknown kinds and permission denied for disallowed kinds/plugins.

Also updates the with_instructions() string in get_info() to mention both new tools.

Integration tests added (apps/skit/tests/mcp_integration_test.rs):

  • mcp_list_plugins_returns_results — calls list_plugins, verifies it returns a JSON array (empty in test server since no plugins are loaded)
  • mcp_get_node_definition_found — calls get_node_definition with kind: "core::passthrough", verifies the definition has inputs and outputs arrays
  • mcp_get_node_definition_not_found — calls with a nonexistent kind, verifies error response

Review & Testing Checklist for Human

  • Verify list_plugins returns correct results when plugins are actually loaded (test server has none)
  • Verify get_node_definition returns complete schema/pin data for a known node kind
  • Confirm permission filtering works correctly for restricted roles (both node and plugin level)

Notes

  • No new dependencies added
  • Follows existing patterns from list_nodes and list_plugins_handler
  • Added is_plugin_allowed guard per Devin Review feedback to match two-level permission pattern

Link to Devin session: https://staging.itsdev.in/sessions/7e9338fcc6804028ac81568bcd65b7b1
Requested by: @streamer45

Add two new MCP tools:

- list_plugins: Lists installed plugins filtered by caller permissions,
  delegating to plugin_manager.list_plugins() with is_plugin_allowed filtering.

- get_node_definition: Looks up a single node definition by kind, with
  is_node_allowed permission check and filtered_node_definitions() reuse.

Update server instructions to mention the new tools.

Add three integration tests:
- mcp_list_plugins_returns_results
- mcp_get_node_definition_found
- mcp_get_node_definition_not_found

Signed-off-by: StreamKit Devin <devin@streamkit.dev>
Co-Authored-By: Claudio Costa <cstcld91@gmail.com>
@staging-devin-ai-integration
Copy link
Copy Markdown
Contributor Author

staging-devin-ai-integration Bot commented Apr 25, 2026

✅ Reviewed on b9137f2

View review

@staging-devin-ai-integration
Copy link
Copy Markdown
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

staging-devin-ai-integration[bot]

This comment was marked as resolved.

Add missing is_plugin_allowed check for plugin:: prefixed kinds in
get_node_definition, matching the two-level permission pattern used in
filtered_node_definitions and websocket_handlers. Without this, a denied
plugin kind would produce a misleading 'not found' error instead of
'permission denied'.

Signed-off-by: StreamKit Devin <devin@streamkit.dev>
Co-Authored-By: Claudio Costa <cstcld91@gmail.com>
@streamer45 streamer45 merged commit ef0df6f into main Apr 25, 2026
17 checks passed
@streamer45 streamer45 deleted the devin/1777138115-mcp-list-plugins-get-node-definition branch April 25, 2026 18:42
@staging-devin-ai-integration
Copy link
Copy Markdown
Contributor Author

MCP Comprehensive Test Report

Date: 2026-04-25 | Branch: test/mcp-combined (all 4 PRs merged onto main) | Build: 93a34e2

Summary

Phase Pass Fail Total
Integration Tests 39 0 39
Live HTTP Tests 42 0 42
Security Tests 5 0 5
STDIO Transport 3 0 3
Total 89 0 89

Overall: ALL 89 TESTS PASS

PR #381 Specific Results (list_plugins, get_node_definition)

Test Status
mcp_list_plugins_returns_results PASS
mcp_get_node_definition_found PASS
mcp_get_node_definition_not_found PASS
Live: list_plugins basic call PASS (empty array, no plugins loaded)
Live: get_node_definition("core::passthrough") PASS (full definition returned)
Live: get_node_definition("nonexistent::node") PASS (error returned)

No regressions in existing tests. Full report: https://staging.itsdev.in/sessions/c0e3bffbfefe401daa6aeeb33d9c2e89

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants